<%-- 
    Document   : rdf_read
    Created on : 18/09/2014, 09:40:29 AM
    Author     : Edwin, Cristian
--%>

<%@page import="org.xml.sax.SAXException"%>
<%@page import="javax.xml.parsers.ParserConfigurationException"%>
<%@page import="BusinessLogic.*" %>
<%
    boolean success = false;
    try {
        RDF_XML_Reader reader = new RDF_XML_Reader();
        String dataPath = session.getServletContext().getRealPath("/");
        String fileName = dataPath + "\\" + request.getParameter("url").replace("/", "\\");
        reader.Read(dataPath, fileName);
        success = true;
    } catch (ParserConfigurationException ex) {
        success = false;
    } catch (SAXException ex) {
        success = false;
    }
%>
<%="{\"sucess\":\""+success +"\"}"%>